import moveEvent from './moveEvent';
var moveBar = function (el, events) {
    this.el = el;
    this.events = events;
    this.el.mousedown((e) => {
        var eventsChangeItem = [];
        for (let i = 0; i < events.length; i++) {
            const element = events[i].obj[events[i].getWidth]();
            eventsChangeItem.push(element);
        };
        this.el.addClass('active');
        moveEvent(e, (left, top) => {
            for (let i = 0; i < events.length; i++) {
                const element = events[i];
                element.obj[events[i].changeEvent](left, top, eventsChangeItem[i]);
            };
        }, () => {
            this.el.removeClass('active');
        });
    });
};
export default moveBar